<?php
action_gatekeeper('registerproject');
$project_guid = $vars['project_guid'];

if(isset($project_guid)){
	$project = get_entity($project_guid);
	$vars['entity'] = $project;
	// set the title
	
	$title = elgg_echo('submana:project:registerproject')." \"".$project->title."\"";
	
	// start building the main column of the page
	$content = elgg_view_title ( $title );
	
	// add form
	$content.= elgg_view_form('registerproject', null, array(
			'project_guid' => $project_guid,
			'group_guid' => $vars['group_guid'],
			'entity' => $project,
	));
	
	// optionally, add the content for the sidebar
	$sidebar = "";
	
	$body = elgg_view_layout ( 'one_sidebar', array (
			'content' => $content,
			'sidebar' => $sidebar
	));
	
	echo elgg_view_page($title, $body);
	echo $project_guid;
} else {
	register_error('submana:project:noneproject');
	forward(REFERER);
}



?>